/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package memsim;

/**
 *
 * @author Joe
 * This is the class to simulate the status register
 * 4 methods to set zero, overflow, underflow and negative flags
 * 1 method to reset all flags to false
 */
public class StatusRegister {

	boolean ZERO;
	boolean OVERFLOW;
	boolean NEGATIVE;
        

        /**
         * Default construtor for StatusRegister
         * sets all flags to false
         */
	public StatusRegister(){
		ZERO = false;
		OVERFLOW = false;
		NEGATIVE = false;
                
	}
        /**
         * Resets all flags to false
         */
        public void resetStatusRegister(){
                ZERO = false;
		OVERFLOW = false;
		NEGATIVE = false;
                
        }
        /**
         * sets the zero flag to true
         */
        public void setZeroFlag(){
            ZERO = true;
        }
        /**
         * sets the overflow flag to true
         */
        public void setOverflowFlag(){
            OVERFLOW = true;
        }
        /**
         * sets the negative flag to true
         */
        public void setNegativeFlag(){
            NEGATIVE = true;
        }

}